<?php
namespace admin\models;

use common\models\SearchInterface;
use common\models\SearchTrait;
use common\models\Tags;

class TagsSearch extends Tags implements SearchInterface
{
    use SearchTrait;

    public function rules()
    {
        return [
            [['tag_name'], 'trim'],
        ];
    }

    public function prepareQuery($query)
    {
        return $query->andFilterWhere(['tag_name' => $this->tag_name])
            ->orderBy('display_order desc');
    }
}
